'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    const { INTEGER, STRING,BOOLEAN } = Sequelize;
    await queryInterface.createTable("pos_folder", {
      id: {
        type: INTEGER,
        primaryKey: true,
        autoIncrement: true,
        comment: "主键id，自增",
      },
      folderName: {
        type: STRING(30),
        allowNull: false,
        comment: "文件夹名称",
      },
      type: {
        type: INTEGER,
        defaultValue: 1,
        comment: "类型 1：图片 2：视频",
      },
      sort: {
        type: INTEGER,
        comment: '排序'
      },
      isSys: {
        type: BOOLEAN,
        defaultValue: false,
        comment: "是否系统默认 true:是 false:否",
      },
    })
  },

  down: async (queryInterface) => {
    await queryInterface.dropTable("pos_folder");
  },
};
